package com.jingshui.Service.imp;

import com.alibaba.fastjson.JSONObject;
import com.jingshui.Dao.ReferrerDao;
import com.jingshui.Service.ReferrerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import orm.base.Ex.BaseServiceEx;

import java.util.Map;

/**
 * Created by ashin on 2017/10/9.
 */

@Service
@Scope("prototype")
public class ReferrerServiceImp extends BaseServiceEx implements ReferrerService {

    @Autowired
    ReferrerDao referrerDao;

    @Override
    public void init() {
        super.init(referrerDao);
    }

    @Override
    public JSONObject getReferrerCount(Map map) throws Exception {
        return this.codeData(referrerDao.getReferrerCount(map));
    }
}
